const path = require('path');
module.exports = function(webpackConfig) {
    webpackConfig.babel.plugins.push('transform-runtime');
    webpackConfig.babel.plugins.push(['import', {
        libraryName: 'antd',
        style: 'css',
    }]);

    return webpackConfig;
};
module.exports = {
    entry: './public/js/entry.js',
    output: {
        path: path.resolve(__dirname+'/public/js/', 'dist'),
        filename: 'bundle.js'
    },
    module : {
        loaders: [
            {
                test: /\.css$/,
                loader: "style-loader!css-loader"
            },
            {
                test : /\.(js|jsx)$/,
                exclude : /node_modules/,
                loader : 'babel-loader',
                options : {
                    presets: ['es2015', 'react', "stage-0"],
                }
            },
        ]
    }
};